#pragma once
#include "Vector2.h"
struct occgrid_t;

class OccupancyProbabilityGrid
{
private:
	float* grid;
	int row_size;
	float corner;

	bool checkForError(occgrid_t* occgrid, int row, int col);
public:
	OccupancyProbabilityGrid(int world_size, float initial_probability);
	~OccupancyProbabilityGrid(void);
	float at(int row, int col);
	void set(int row, int col, float val);
	void update(occgrid_t* occgrid);

	void cleanup();
	bool obstacleInDirection(Vector2 current, int x, int y);
};

